<?php
$view_menu = '<ul id="nav">';
$home = '<li><a href="index.html"><img src="images/home.png" alt="Home Total Life" /></a></li>';
$menu = $tc->menu(0,2);
$i=0;
while($row = mysql_fetch_array($menu)){ $i++;
	if($i==1) $view_menu .= $home;
	else{
		$view_menu .= '<li><a href="'.$row['url'].'">'.$row['name'].'</a>';
		$view_menu .= $tc->getSubmenu($row['id'],2);
		$view_menu .= '</li>';
	}
}
mysql_free_result($menu);
echo $view_menu.'</ul>';?>
<script type="text/javascript">
$(document).ready(function(){
	$("#nav li").hover(function(){
		$(this).find('ul:first').css({visibility: 'visible', display: 'none'}).show(200);
	}, function(){
			$(this).find('ul:first').css({visibility: 'hidden'});
	});
});
</script>